//
//  LJCRadioCollectionViewCell.m
//  WZLProduct
//
//  Created by 陆静聪 on 16/3/18.
//  Copyright © 2016年 HaiTeng. All rights reserved.
//

#import "LJCRadioCollectionViewCell.h"

@interface LJCRadioCollectionViewCell ()

@property (nonatomic, retain) UIImageView *nameImage;/**< 选项图 */
@property (nonatomic, retain) UILabel *nameLabel;/**< 选项标识 */

@end

@implementation LJCRadioCollectionViewCell

- (void)giveDataWithTitle:(NSString *)title Image:(NSString *)image {
    _nameImage.image = [UIImage imageNamed:image];
    _nameLabel.text = title;
}

- (instancetype)initWithFrame:(CGRect)frame {
    self = [super initWithFrame:frame];
    if (self) {
        [self createCell];
    }
    return self;
}

- (void)createCell {
    
    _nameImage = [[UIImageView alloc] init];
    [self.contentView addSubview:_nameImage];
    [_nameImage mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.left.offset(18);
        make.right.offset(-18);
        make.height.equalTo(_nameImage.mas_width);
    }];
    _nameImage.backgroundColor = [UIColor clearColor];
    
    _nameLabel = [[UILabel alloc] init];
    [self.contentView addSubview:_nameLabel];
    [_nameLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.equalTo(_nameImage.mas_bottom).offset(1);
        make.right.left.offset(0);
        make.height.mas_equalTo(20);
    }];
    _nameLabel.textAlignment = NSTextAlignmentCenter;
    _nameLabel.font = FONT12;
    
    
}


@end
